< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03030204.xhp

(section: second) (bookmark: bm_id3153346)
Second function

Second 関数

Second Function [Runtime]
Second 関数 [実行時](hd_id3153346.1)

Returns an integer that represents the seconds of the serial time number that is generated by the TimeSerial or the TimeValue function.
TimeSerial ないし TimeValue 関数による時刻データのシリアル変換値を基に、該当時刻の秒を示す数値を返します。(par_id3156023.2)

(/section: second)

Syntax:
構文:(hd_id3147264.3)

Second (Number)
Second (Number)(par_id3146795.4)

Return value:
戻り値:(hd_id3150792.5)

Integer
整数(par_id3154140.6)

Parameters:
パラメータ:(hd_id3156280.7)

Number: Numeric expression that contains the serial time number that is used to calculate the number of seconds.
Number: 秒情報を得る時刻データのシリアル変換値を示す数値表式。(par_id3154124.8)

This function is the opposite of the TimeSerial function. It returns the seconds of a serial time value that is generated by the TimeSerial or TimeValue functions. For example, the expression:
この関数は、TimeSerial 関数と逆方向の機能を担っています。この場合の戻り値としては、時刻データを TimeSerialTimeValue 関数で変換したシリアル値を基に、該当時刻の秒を示す整数値が返されます。こうした点は、下記のコードを実行してみると分かりやすいでしょう。(par_id3125864.9)

Print Second(TimeSerial(12,30,41))
Print Second(TimeSerial(12,30,41))(par_id3153951.10)

returns the value 41.
この場合の戻り値は 41 となります。(par_id3151117.11)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3147426.12)

Sub ExampleSecond
Sub ExampleSecond(par_id3154012.13)

MsgBox "The exact second of the current time is "& Second( Now )
MsgBox "正確な現在時刻の秒は、 "& Second( Now )(par_id3156441.14)

End sub
End sub(par_id3151112.15)


< Prev / Next >